import React, { useRef, useState } from 'react';
import { View, Text } from '@tarojs/components';
import { FlowList } from '@/components';
import { OrderItem } from './components/index';

const FlowListScreen: Taro.FC = () => {
  const ref = useRef(null);
  const [scrollInfoId ,setScrollInfoId] = useState(0)
  
  return (
    <View>
      <View onClick={()=>{
        setScrollInfoId(0)
      }}>点击 </View>
      <FlowList
        ref={ref}
        scrollStyle={{
          height: `100vh`
        }}
        scrollTop={scrollInfoId}
        initData={[1, 2, 3,4,5,6,7,8]}
        renderItem={(item, index) => <OrderItem/>}
      />
    </View>
  );
};
export default FlowListScreen;
